'use strict';

angular.
    module('login').
    component('login', {
        templateUrl: 'components/login/login.template.html',
        controller: function LoginController($scope, $state) {

            /*考试名称*/
            $scope.ministryDuty = "";
            $scope.username = "";
            $scope.militaryNum = "";
            localStorage.removeItem("userInfo");
            $scope.userLogin = function () {
                localStorage.setItem("userInfo", JSON.stringify({
                    ministryDuty: $scope.ministryDuty,
                    username: $scope.username,
                    militaryNum: $scope.militaryNum
                }));
                $state.go('exam');
            };
        }
    });